import * as types from './mutation-types'
import axios from 'axios';
import API from '@/api'

export default {
	//获取导航数据
	/* [types.GET_NAVIGATION]({ commit, state }, params) {
		API.navigation().then((res) => {
			if (res.data.success) {
				commit(types.UPDATE_NAVIGATION, res.data.data)
			} else {
				vm.$message({
					duration: 5000,
					type: 'warning',
					message: res.data.msg
				})
			}
		}).catch((err) => {
			console.log(err)
		})
	} */
	[types.UPDATE_appState]({ commit, state }, data) {
		commit(types.SET_appState, data)
		sessionStorage.setItem('appState', JSON.stringify(Object.assign({},state.appState,data)))
	}
}
